package com.drinkdelivery.common.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.drinkdelivery.common.annotation.Excel;
import com.drinkdelivery.common.core.domain.BaseEntity;

/**
 * 商户商品库存对象 merchant_product_inventory
 *
 * @author lzh
 * @date 2024-07-29
 */
public class MerchantProductInventory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 商户ID */
    @ApiModelProperty(value = "商户ID")
    @Excel(name = "商户ID")
    private Integer merchantId;

    /** 商品ID */
    @ApiModelProperty(value = "商品ID")
    @Excel(name = "商品ID")
    private Integer productId;

    /** 库存数量 */
    @ApiModelProperty(value = "库存数量")
    @Excel(name = "库存数量")
    private Integer stock;

    /** 销量 */
    @ApiModelProperty(value = "销量")
    @Excel(name = "销量")
    private Integer sales;

    /** 折扣 */
    @ApiModelProperty(value = "折扣")
    @Excel(name = "折扣")
    private BigDecimal discount;

    /** 逻辑删除标记，0-未删除，1-已删除 */
    @ApiModelProperty(value = "逻辑删除标记，0-未删除，1-已删除")
    @Excel(name = "逻辑删除标记，0-未删除，1-已删除")
    private Integer isDeleted;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setMerchantId(Integer merchantId)
    {
        this.merchantId = merchantId;
    }

    public Integer getMerchantId()
    {
        return merchantId;
    }
    public void setProductId(Integer productId)
    {
        this.productId = productId;
    }

    public Integer getProductId()
    {
        return productId;
    }
    public void setStock(Integer stock)
    {
        this.stock = stock;
    }

    public Integer getStock()
    {
        return stock;
    }
    public void setSales(Integer sales)
    {
        this.sales = sales;
    }

    public Integer getSales()
    {
        return sales;
    }
    public void setDiscount(BigDecimal discount)
    {
        this.discount = discount;
    }

    public BigDecimal getDiscount()
    {
        return discount;
    }
    public void setIsDeleted(Integer isDeleted)
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted()
    {
        return isDeleted;
    }
    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("merchantId", getMerchantId())
                .append("productId", getProductId())
                .append("stock", getStock())
                .append("sales", getSales())
                .append("discount", getDiscount())
                .append("isDeleted", getIsDeleted())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())

                .toString();
    }
}
